MD5 is a secure hash algorithm. It takes a string as input, and produces a 128-bit number, the hash. The same string always produces the same hash, but given a hash, it is not generally possible to determine the original string. Secure hash algorithms are useful for protecting passwords and ensuring data integrity. This site has a JavaScript implementation of MD5, and some other secure hash algorithms. This allows web sites to perform simple cryptography on clients, enabling some useful applications:
Demonstration
hex_md5("message digest") = "f96b697d7cb7938d525a2f31aaf161d0" hex_sha1("160-bit hash") = "90d925d853c3d35cd54070bb75280fefad9de9e7" More Information
Algorithm Information
Collision WeaknessIn 2004, a cryptographic weakness was discovered in both the MD5 and SHA-1 algorithms. One of the design goals of secure hash algorithms is "collision resistance". In others words, someone can't find two strings that hash to the same value. Because MD5 is 128-bit, by random chance you will find a collision by producing 264 hashes. The weakness in MD5 is that a way has been found to produce such collisions with only 242 hashes, which makes producing collisions practical. In 2008 a paper was released demonstrating a collision attack that produced a false certificate authority - allowing impersonation of any SSL site on the internet. more... While it is imperitive for ceritifcate authorities to stop issuing MD5 certificates, most uses of JavaScript hashing (e.g. protecting passwords) do not rely on the collision resistance property. These weaknesses do not create a vulnerability in such web sites. It is acceptable to continue using MD5 for such puposes, although I recommend that new sites use SHA-256 or stronger. Users of the Script
© 1998 - 2012
Paul Johnston, distributed under the BSD License Updated:16 May 2011 |